# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Notebooks.V1.Model.LocalDiskInitializeParams do
  @moduledoc """
  Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new runtime. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

  ## Attributes

  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. Provide this property when creating the disk.
  *   `diskName` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.
  *   `diskSizeGb` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB. Default 100 GB.
  *   `diskType` (*type:* `String.t`, *default:* `nil`) - Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :description => String.t() | nil,
          :diskName => String.t() | nil,
          :diskSizeGb => String.t() | nil,
          :diskType => String.t() | nil,
          :labels => map() | nil
        }

  field(:description)
  field(:diskName)
  field(:diskSizeGb)
  field(:diskType)
  field(:labels, type: :map)
end

defimpl Poison.Decoder, for: GoogleApi.Notebooks.V1.Model.LocalDiskInitializeParams do
  def decode(value, options) do
    GoogleApi.Notebooks.V1.Model.LocalDiskInitializeParams.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Notebooks.V1.Model.LocalDiskInitializeParams do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
